﻿<%@ Page Title="Add an Event" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="AddEvent.aspx.vb" Inherits="BeachesInGreeceComplete.AddEvent" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </ajaxToolkit:ToolkitScriptManager>
    <h3>
            Create An Event</h3>
        <br />
        <br />
        <table>
            <tr>
                <td>
                    Event
                </td>
                <td>
                    <asp:DropDownList ID="ddl_Category" runat="server" DataSourceID="SqlDataSource1"
                        DataTextField="ActivityName" DataValueField="ActivityName" AutoPostBack="True"
                        AppendDataBoundItems="true">
                        <asp:ListItem Selected="True">Select Event</asp:ListItem>
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:BeachConnectionString %>"
                        ProviderName="<%$ ConnectionStrings:BeachConnectionString.ProviderName %>" SelectCommand="SELECT DISTINCT [ActivityName] FROM [Activities] ORDER BY ActivityName DESC">
                    </asp:SqlDataSource>
                </td>
            </tr>
            <tr>
                <td>
                    Location
                </td>
                <td>
                    <asp:DropDownList ID="ddl_Beaches" runat="server">
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:Label ID="lbl_Error" runat="server" CssClass="field-validation-error" Text="*"></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                    Participants(Max Number)
                </td>
                <td>
                    <asp:TextBox ID="tb_Attendees" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"
                        ControlToValidate="tb_Attendees" CssClass="field-validation-error"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="tb_Attendees"
                        CssClass="field-validation-error" ErrorMessage="*" ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Date of Event
                </td>
                <td>
                    <asp:TextBox ID="tb_Date" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*"
                        ControlToValidate="tb_Date" CssClass="field-validation-error"></asp:RequiredFieldValidator>
                    <ajaxToolkit:CalendarExtender ID="tb_Date_CalendarExtender" runat="server" Enabled="True"
                        TargetControlID="tb_Date" Format="dd-MM-yyyy">
                    </ajaxToolkit:CalendarExtender>
                </td>
            </tr>
            <tr>
                <td>
                    Attending the Event</td>
                <td>
                    <asp:RadioButtonList ID="rbl_Attending" runat="server" 
                        RepeatDirection="Horizontal">
                        <asp:ListItem Selected="True" Value="-1">Yes</asp:ListItem>
                        <asp:ListItem Value="0">No</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
        </table>
        <asp:Button ID="btn_AddEvent" runat="server" Text="Create Event" CssClass="m-btn blue" />
</asp:Content>
